<script>
	import {
		mapActions
	} from 'vuex'
	export default {
		onLaunch: function() {
			console.log('App Launch')
			this.getIsLogin()
		},
		onShow: async function() {
			console.log('App Show', this.$store)
			if (this.$store.state.isLogin === 1) {
				await this.getUserInfo()
				this.getShopCart()
			}
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			...mapActions(['getIsLogin', 'getUserInfo', 'getShopCart'])
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	html,
	body,
	#app {
		height: 100%;
	}
</style>